using System.Collections.Generic;

namespace GitProjectManager.Models
{
    public class AppConfig
    {
        public string ConfigVersion { get; set; } = "1.0";
        public List<GitProject> Projects { get; set; } = new List<GitProject>();
        public WindowSettings WindowSettings { get; set; } = new WindowSettings();
        public IDESettings IDESettings { get; set; } = new IDESettings();
        public ScanSettings ScanSettings { get; set; } = new ScanSettings();
    }

    public class WindowSettings
    {
        public int Width { get; set; } = 1000;
        public int Height { get; set; } = 600;
        public int X { get; set; } = 100;
        public int Y { get; set; } = 100;
        public bool Maximized { get; set; } = false;
    }

    public class IDESettings
    {
        public string DefaultIDE { get; set; } = "code";
        public Dictionary<string, string> IDEPaths { get; set; } = new Dictionary<string, string>
        {
            ["code"] = "code",
            ["visualstudio"] = "devenv",
            ["rider"] = "rider64",
            ["idea"] = "idea64",
            ["pycharm"] = "pycharm64",
            ["webstorm"] = "webstorm64",
            ["sublime"] = "sublime_text",
            ["notepad++"] = "notepad++"
        };
        
        // 自定义exe程序列表，键为程序名称，值为完整路径或可执行文件名
        public Dictionary<string, string> ExePrograms { get; set; } = new Dictionary<string, string>();
    }

    public class ScanSettings
    {
        public List<string> ScanPaths { get; set; } = new List<string>
        {
            "%USERPROFILE%\\Documents",
            "%USERPROFILE%\\Desktop",
            "%USERPROFILE%\\source",
            "%USERPROFILE%\\dev",
            "%USERPROFILE%\\projects",
            "%USERPROFILE%\\workspace"
        };
        public int MaxDepth { get; set; } = 5;
        public bool AutoScanOnStartup { get; set; } = true;
    }
}